<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<html>
<head>
    <title>帐号管理</title>
<link href="../styles/xuanz.css" rel="stylesheet" type="text/css" />
<script src="../styles/script.js" type="text/javascript"></script>
</head>

<body>
<div id="neinei">
<div id="kuangkuang_admin">
<%@ include file="/common/left-admin.jsp"%>
<div class="kuangright">
<h1>帐号列表</h1>
<table width="580" border="0" cellspacing="1" cellpadding="5">
  <tr>
    <td width="10%" align="center" bgcolor="#f2f2f2">序号</td>
    <td width="26%" align="center" bgcolor="#f2f2f2">账号</td>
    <td width="24%" align="center" bgcolor="#f2f2f2">角色</td>
    <td width="28%" align="center" bgcolor="#f2f2f2">所属高校</td>
    <td width="12%" align="center" bgcolor="#f2f2f2">操作</td>
  </tr>
     <s:if test="accountsList.size > 0">
       <s:iterator value="accountsList" status="stat">
       <tr align="center">
         <td bgcolor="#FFFFFF">&nbsp;<s:property value="#stat.index + 1" /></td>
         <td bgcolor="#FFFFFF" align="left">&nbsp;<s:property value="username" /></td>
         <td bgcolor="#FFFFFF" align="left">&nbsp; <s:property value="role.description" /></td>
         <td bgcolor="#FFFFFF" align="left">&nbsp;<s:property value="school.name" /></td>
         <s:url id="deleteUrl" action="accountsDelete" namespace="/admin">
             <s:param name="id" value="id" />
         </s:url>
         <td bgcolor="#FFFFFF"><s:a href="%{deleteUrl}">删除</s:a></td>
       </tr>
       </s:iterator>
     </s:if>
</table>
<br />
<div class="jsbox_ht_mainright"><b>&nbsp;&nbsp;添加高校帐号</b></div>
<div style="color:red;clear:both">
<s:fielderror />
</div>
<s:form action="accountsAdd" method="post" onsubmit="return checkfrm();" namespace="/admin">
<s:textfield name="user.username" label="登录帐号" maxlength="30" cssStyle="width:150px"/>
<s:password name="user.password" label="登录密码" maxlength="16" cssStyle="width:150px"/>
<s:password name="passwordAgain" label="密码确认" maxlength="16" cssStyle="width:150px"/>
<s:select
        label="所属高校"
        list="schoolList"
        name="schoolId"
        listKey="id"
        listValue="name"
        headerKey="-1"
        headerValue="--- 请选择高校  ---"
        cssStyle="width:155px"
        />
<s:submit value="增  加"/>
</s:form>
<br />
<br />
</div>
</div>
</div>

</body>
</html>
